#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @File : save_sucess_page.py
# @Autor: FY
# @Date: 2021/10/12
from selenium.webdriver.common.by import By

from pages.base_page import BasePage
from pages.edit_blogs_page import EditBlogsPage


class SaveSuccessPage(BasePage):
    continue_edit_locator = (By.XPATH, '//a[text()="» 继续编辑"]')

    def click_continueEdit(self):

        self.find_and_click_btn(self.continue_edit_locator)


        return EditBlogsPage(self.driver)

    def is_save_success_page(self):
        # 通过判断是否存在继续编辑
        return self.find_element(self.continue_edit_locator)

